<template>
  <div class="headerWrap">
    <img :src="src">
  </div>
</template>

<script type='text/ecmascript-6'>
export default {
  components: {},
  props: {
    src: null,
    size: null
  },
  data() {
    return {
      styleObj: this.styleObjFun()
    };
  },
  mounted() { },
  methods: {
    styleObjFun() {
      if (this.size) {
        return {
          width: this.size + 'px',
          height: this.size + 'px'
        }
      }
      return null;
    }
  }
}
</script>

<style lang='scss' scoped>
.headerWrap {
  width: 40px;
  height: 40px;
  background: #fff;
  > img {
    width: 100%;
    height: 100%;
  }
}
</style>